package com.qf.listener;

import com.qf.pojo.MsgObj;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "test2",consumerGroup = "test2-consumer-group2",consumeMode = ConsumeMode.ORDERLY)
public class Consumer4 implements RocketMQListener<MsgObj> {
    @Override
    public void onMessage(MsgObj message) {
        System.out.println("Consumer4:消息数据:" + message);
    }
}
